//
//  FCLeftCoinsCell.m
//  FundChain
//
//  Created by 肖浩然的mac on 2018/4/16.
//  Copyright © 2018年 RUIXIN. All rights reserved.
//

#import "FCLeftCoinsCell.h"

@implementation FCLeftCoinsCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setSubView];
    }
    return self;
}
-(instancetype)init{
    if (self = [super init]) {
       [self setSubView];
    }
    return self;
    
}
-(void)setSubView{
    
    self.nameLabel = [UILabel new];
    [self addSubview:self.nameLabel];
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self).offset(60*KScreenWidthScale750);
        make.centerY.mas_equalTo(self);
    }];
    self.nameLabel.font = Kfont(28);
    self.nameLabel.textColor = kOrderColor;
   
}
-(void)setWalletModel:(FCWalletsModel *)walletModel{
    _walletModel = walletModel;
    self.nameLabel.text = walletModel.walletName;
    
    NSString *allName;
    switch ([walletModel.walletId integerValue]) {
        case 1001:
        {
            allName = Localized(@"比特币");
        }
            break;
        case 1005:
        {
            allName = Localized(@"莱特币");
        }
            break;
        case 1006:
        {
            allName = Localized(@"比特币现金");
        }
            break;
        case 1009:
        {
            allName = Localized(@"加密现金币");
        }
            break;
        case 1010:
        {
            allName = Localized(@"零币");
        }
            break;
            
        default:
            break;
    }
    
    self.nameLabel.text = [NSString stringWithFormat:@"%@ (%@)",walletModel.walletName,allName];
}
@end
